﻿@model DevFramework.Entities.Concrete.Product

<div id="popupEdit">
    <div class="form-group">
        @Html.LabelFor(t => t.ProductName, @Word("Admin.Product.ProductName"))
        @Html.TextBoxFor(t => t.ProductName, new { @class = "form-control input-sm" })
        @Html.ValidationMessageFor(t => t.ProductName)
    </div>
    <div class="form-group">
        @Html.LabelFor(t => t.CategoryId, "Kategori")
        @Html.DropDownListFor(t => t.CategoryId, new SelectList((List<Category>)ViewData["categories"], "CategoryId", "CategoryName"), new { style = "width:100%;", @class = "form-control input-sm" })
        @Html.ValidationMessageFor(t => t.CategoryId)
    </div>
    <div class="form-group">
        @Html.LabelFor(t => t.QuantityPerUnit, "Açıklama")
        @Html.TextBoxFor(t => t.QuantityPerUnit, new { @class = "form-control input-sm" })
        @Html.ValidationMessageFor(t => t.QuantityPerUnit)
    </div>
    <div class="form-group">
        @Html.LabelFor(t => t.UnitPrice, "Birim Fiyat")
        @Html.TextBoxFor(t => t.UnitPrice, new { @class = "form-control input-sm" })
        @Html.ValidationMessageFor(t => t.UnitPrice)
    </div>
    <div class="form-group">
        @Html.LabelFor(t => t.UnitsInStock, "Stok Durumu")
        @Html.TextBoxFor(t => t.UnitsInStock, new { @class = "form-control input-sm" })
        @Html.ValidationMessageFor(t => t.UnitsInStock)
    </div>
    <div class="form-group">
        @Html.LabelFor(t => t.Picture, "Resim")
        @(Html.Kendo().Upload().Name("picture").Async(conf =>
          {
              conf.AutoUpload(true);
              conf.Save("Admin", new { action = "PictureSave", controller = "Product" });
              conf.Remove("Admin", new { action = "PictureRemove", controller = "Product" });
          }))
        @Html.ValidationMessageFor(t => t.Picture)
    </div>

    <div class="form-group">
        @Html.LabelFor(t => t.FileContent, "Dosya")
        @(Html.Kendo().Upload().Name("file").Async(conf =>
    {
        conf.AutoUpload(true);
        conf.Save("Admin", new { action = "FileSave", controller = "Product" });
        conf.Remove("Admin", new { action = "FileRemove", controller = "Product" });
    }))
        @Html.ValidationMessageFor(t => t.Picture)
        
    </div>
</div>
<style>
    #popupEdit {
        width: 95%;
        margin: 5px auto 5px auto;
    }

        #popupEdit * {
            -webkit-box-sizing: border-box !important;
            -moz-box-sizing: border-box !important;
            box-sizing: border-box !important;
        }

    .k-edit-form-container {
        width: 100%;
    }
</style>





